/***********************************************************************
 * Module:  ProductDetail.java
 * Author:  ZhangYQ
 * Purpose: Defines the Class ProductDetail
 ***********************************************************************/

package office.bo.sale.impl;

import office.bo.sale.IProductDetail;
import office.domainset.BizDomainProviderSetImpl;
import platform.common.bo.PersistenceBO;
import platform.common.dao.IDomainProviderSet;
import platform.common.exception.BusinessException;

public class ProductDetail extends PersistenceBO implements IProductDetail {
	private static final long serialVersionUID = 1L;
	private String productName; //产品名称
	private String productSpec; //产品规格
	private String speciality;  //产品优缺点
	private String mark;        //备注
	private String rivalId;     //对应的竞争对手
	private String rivalName;     //对应的竞争对手
	/**
	 * 获取竞争对手
	 * @param domainProviderSet
	 * @return
	 * @throws BusinessException
	 */
	public Rival getRival(IDomainProviderSet domainProviderSet) throws BusinessException{
		Rival rival=null;
		try {
			BizDomainProviderSetImpl domainProviderSetImpl = (BizDomainProviderSetImpl) domainProviderSet;
			rival=(Rival)domainProviderSetImpl.getDao().findByIdAndDomain(domainProviderSetImpl.getRivalDP(), this.getRivalId());
		} catch (Exception e) {
			throw this.handleBusinessBOException(e);
		}
		return rival;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public String getProductSpec() {
		return productSpec;
	}
	public void setProductSpec(String productSpec) {
		this.productSpec = productSpec;
	}
	public String getSpeciality() {
		return speciality;
	}
	public void setSpeciality(String speciality) {
		this.speciality = speciality;
	}
	public String getMark() {
		return mark;
	}
	public void setMark(String mark) {
		this.mark = mark;
	}
	public String getRivalId() {
		return rivalId;
	}
	public void setRivalId(String rivalId) {
		this.rivalId = rivalId;
	}
	public String getRivalName() {
		return rivalName;
	}
	public void setRivalName(String rivalName) {
		this.rivalName = rivalName;
	}
	
	
}